function curry(fn) {
    let judge = (...args) => {
        console.log('fn.length',fn.length)
        if (args.length == fn.length) return fn(...args)
        return (...arg) => judge(...args, ...arg)
    }
    return judge
};
function add(a, b, c) {
    return a + b + c
}
add(1, 2, 3)
let addCurry = curry(add)
addCurry(1)(2)(3)
6
addCurry(4,5,6);
15


function test(a,b){

}

(function fn(f){
    console.log(f.length)
}(test))
